<?php
define('DS', DIRECTORY_SEPARATOR);
define ('ROOT', dirname(dirname(__FILE__)) . DS);
define ('CONFIG', ROOT.'configuration'.DS);
$mahees_framework_path = ROOT.'components'.DS.'emerald_framework'.DS;
require($mahees_framework_path.'vendor'.DS.'plugins'.DS.'spyc.php');
require($mahees_framework_path.'Database_connections.php');

$dbh = Database_connections::get_connection();

class Sql_datatypes {

	private $textTypes = array('char', 'varchar', 'text', 'blob');
	//private $textTypesReqRanges = array('char' => array(0,255), 'varchar' => array);


}


class Table {

	private $table_name = false;
	private $columns = array();

	public function Table($table_name) {
		$this->table_name = $table_name;
		echo "\n".'created ' . $table_name;
	}

	function  __destruct() {
		echo "\n".'destructing ' . $this->table_name;

	}

	function column($name, $type, $other = array()) { //otehr = null w/e
		array_push($this->columns, array('name' => $name, 'type' => $type, 'other' => $other));
	}

	function save() { self::__destruct(); }

}

function create_table($table_name) {
	"CREATE TABLE $table_name (id INT)";
}

$atable = new Table('newwwwwtable');
$atable->save();
$atable = new Table('nnwsxd');


// create_table(:suppliers)
 # Add a column to 'suppliers'.
//add_column(:suppliers, :name, :string, {:limit => 60})

//remove_column :products, :description
//remove_column :products, :name
//add_column :products, :part_number, :string
//add_index :products, :part_number
//rename_column :products, :upccode, :upc_code
?>
